#!/bin/sh

uci -q batch <<-EOF >/dev/null
	delete firewall.ssr_libev_server
	set firewall.ssr_libev_server=include
	set firewall.ssr_libev_server.type=script
	set firewall.ssr_libev_server.path=/var/etc/ssr_libev_server.include
	set firewall.ssr_libev_server.reload=1
EOF

uci -q batch <<-EOF >/dev/null
	delete ucitrack.@ssr_libev_server[-1]
	add ucitrack ssr_libev_server
	set ucitrack.@ssr_libev_server[-1].init=ssr_libev_server
	commit ucitrack
EOF

rm -rf /tmp/luci-*cache
exit 0
